package com.vogue.supplymall.order.controller;

import com.vogue.gear.memory.provider.IMemProvider;
import com.vogue.supplymall.common.constant.ConstantBean;
import com.vogue.supplymall.common.domain.dto.ControllerResultInfo;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * Created by Administrator on 2017-11-28.
 */
@RestController
public class BaseTestController extends com.vogue.ssm.controller.BaseController {
    @Resource(name = "memProvider")
    private IMemProvider<Object> memProvider;

    @RequestMapping(value = "/suppliermall/ns/{appver}/order/mem/get", method = RequestMethod.POST)
    public ResponseEntity<Object> getCart(@PathVariable("appver") String appver) {
        Map<String, Map<String, String>> platform = (Map<String, Map<String, String>>) memProvider.get(ConstantBean.PLATFORM_PROVIDER_NAME);
        ControllerResultInfo resultInfo = new ControllerResultInfo();
        resultInfo.setData(platform);
        return new ResponseEntity<>(resultInfo, HttpStatus.OK);
    }
}
